//
//  ViewController.m
//  LoadInitialize
//
//  Created by meitianhui2 on 2017/12/28.
//  Copyright © 2017年 DeLongYang. All rights reserved.
/*
    1.0 我们需要测试 load 
 */

#import "ViewController.h"
#import "Object.h"
#import "SubObject.h"
#import "SecondObject.h"    // 不管有没有 import 都会调用 load 方法
#import "SubObjectTwo.h"

@interface ViewController ()

@end

@implementation ViewController


- (void)viewDidLoad
{
    [super viewDidLoad];
    //
//    [self testInitialize];
//    [self testSecondObject];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark ----  测试 initialize
- (void)testInitialize
{
    Object *a = [[Object alloc] init];
    Object *b = [[Object alloc] init];
    //
    SubObject *c = [[SubObject alloc] init];
    SubObject *d = [[SubObject alloc] init];
    
}

- (void)testSubObject
{
    SubObject *secondObj = [[SubObject alloc] init];
}



- (void)testSecondObject
{
    // 检测是否 会调用父类的 initialize  方法
    SecondObject *secondObj = [[SecondObject alloc] init];
}







@end
